<?php

namespace App\Http\Controllers\Backend;

use App\Http\Controllers\Controller;
use App\Http\Requests\Validators\Backend\AuthValidator;
use Illuminate\Http\Request;

/**
 * 登陆/登出/认证相关
 */
class AuthController extends Controller
{
    const VALIDATOR = AuthValidator::class;

    public function backendLogin(Request $request)
    {
        //参数验证
        $this->my_validate($request->only('phone', 'password'), 'loginRules');

        return parent::login($request->only('phone', 'password'));
    }

    public function logout()
    {
        return parent::logout();
    }
}
